"use strict";

console.log(typeof (Function));
console.log(typeof (new Function()));
console.log(typeof (Array));
console.log(typeof (Object));
console.log(typeof (new Array()));
console.log(typeof (new Date()));
console.log(typeof (new Object()));

function Person() {

}

let ob1 = new Person();
console.log(typeof (ob1));
console.log(ob1);
console.log(ob1.constructor);

let ClassPerson = new Function("x", "y", "x=3;y=4");
let ob2 = new ClassPerson();
console.log(typeof (ob2));
console.log(ob2);
console.log(ob2.constructor);

let ClassPerson2 = function () {

}


function where() {
    let reg = /\s+at\s(\S+)\s\(/g
    let str = new Error().stack.toString()
    let res = reg.exec(str) && reg.exec(str)
    return res && res[1]
}

function callWhere() {
    let callerName = where();
    console.log(callerName);
}

callWhere();
